﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace Domain.Models
{
    [DisplayName("角色")]
    public class Role : BaseEntity
    {
        [DisplayName("编号")]
        public int Id { get; set; }

        [Description("角色名称")]
        [StringLength(50)]
        [NotNull]
        public string RoleName { get; set; }

        [Description("角色描述")]
        [StringLength(500)]
        public string Description { get; set; }

        [DisplayName("账户角色")]
        public virtual ICollection<AccountRole> AccountRoles { get; set; } = new List<AccountRole>();

        [DisplayName("角色权限")]
        public virtual ICollection<RolePermission> RolePermissions { get; set; } = new List<RolePermission>();

        //[DisplayName("组角色")]
        //public virtual ICollection<GroupRole> GroupRoles { get; set; }
    }
}
